package top.hcode.hoj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import top.hcode.hoj.pojo.entity.coll.CollQuestion;

/**
 * @author orangej
 * @since 2025-02-09
 */
@Mapper
@Repository
public interface CollQuestionMapper extends BaseMapper<CollQuestion> {

    @Select("SELECT MAX(sort_order) FROM coll_question WHERE coll_id = #{collId}")
    Integer selectMaxSortOrder(@Param("collId") String collId);
}
